This application is related to copending application (Attorney Docket No. 37229/186694) entitled xe2x80x9cMethod And System For Recreating A User Interface Of An Existing Application Text Based User Interface Into A Graphical User Interfacexe2x80x9d, which was concurrently filed with this application.
The invention relates to a method and system for extracting and transforming business knowledge from existing applications to new applications to be deployed on the same and/or new platforms.
Legacy systems are software applications that have been written some time ago and which do not conform or are not usable on new or modern software platforms. For example, a legacy system or application is any system or application implemented and used by a company for a number of years and which became an integral part of running the business. More specifically, it is a system which persists in use over a large turnover of managers of the system. Such systems or programs run fine, but each new manager has less knowledge of the system or program as time progresses. Examples of such legacy systems include mainframe programs written in COBOL, PL/I, and C. Such programs typically contain a great deal of business knowledge. It is often desirable to extract the business knowledge for implementation into a new application on more modern platforms. Examples of such modern platforms are Java, C++, or Visual Basic.
For purposes of the invention, a xe2x80x9cbusiness rulexe2x80x9d is a self contained section of legacy code that is focused on the computation of a specific business policy expressed by a computation of value of a single or group of variables or, alternatively, by establishing an outcome of a specific business decision. Typical examples of such business rules include calculation of a bond""s yield to maturity, determination of employment status, approval of loan eligibility or fulfillment of graduation requirements. Business rules can be described or defined at different levels, with a business rule often being composed of multiple business rules where it may become desirable to extract a higher level business rule, or one of the lower level business rules of a multiple number of business rules making up the higher level business rule. For example, a higher level business rule may be a subroutine that a banking system uses to qualify a user and determine a customer""s mortgage. Such a higher level business rule can include lower level business rules such as the analysis done to determine whether: (1) the customer qualifies; (2) the availability of second mortgages; (3) determining whether based on customer data the customer merits a premium account; and/or (4) what is the best mortgage for the customer based on customer data. Thus, based on this description, it would be readily apparent to those of ordinary skill in the art what is intended by the term xe2x80x9cbusiness rulexe2x80x9d as used herein.
It is well known that such business rules in legacy applications can be scattered throughout the entire program, and are most likely mixed in with other pieces of program logic. Further, under a typical legacy system, the mission critical business logic, or xe2x80x9cbusiness rulesxe2x80x9d therein are neither well documented nor easy to understand. The process of rediscovery is typically painful and costly, and once the legacy application, e.g., COBOL-based, xe2x80x9cbusiness rulexe2x80x9d is isolated, the conversion of monolithic procedural code into a modern program language such as Java and the like must be dealt with in a manner which results in understandable hierarchies.
Thus, in implementing xe2x80x9cbusiness rulesxe2x80x9d from legacy applications in modern programs and platforms, the business rule must first be identified. One example of such an identification involves the end user of a COBOL program. Such an end user knows that the COBOL program does a value calculation that kicks off a sales process. Specifically, the program determines how often customers should be called based on the specific set of product lines they own. No one knows the basis on which the calculation is made. This may be identified as a xe2x80x9csales call rulexe2x80x9d and is thus an ideal candidate for extraction as its own modular object. In accordance with the necessary steps to be taken to find and extract such a business rule, the rule in the legacy source code must be located and extracted as a self contained routine. If the legacy code is well structured, the extraction of a business rule may be as simple as xe2x80x9ccut and pastexe2x80x9d. However, most legacy code presents a number of challenges because such a rule can be scattered, for example, in a program of approximately 4,000 lines of code or more.
Thus, in accordance with the invention, the problems of meticulous and burdensome searching through legacy code to identify and extract a business rule for implementation on modern platforms and in modern applications is avoided in accordance with the method and system of the invention.
The invention is directed to a method of extracting and transforming a business rule from an existing program, typically a legacy application, to a new and more modern application, existing on the same or new platforms. For example, an existing application based on COBOL, PL/I, or C is transformed into a new application based on the same language or new application based on Java, C++, or Visual Basic. The method includes the steps of identifying the business rule. Thereafter, the business rule code in the existing program is located and extracted in human readable code form, for example, source code, from the business rule code in the existing program. New code is generated for the new application, which contains the business rule therein. For example, such code can be generated by a translator or a code generator, which is conventional and well known to those of ordinary skill in the art. Thereafter, the code containing the business rule, which has been newly generated is integrated into the new application for implementing the business rule as part of the new application. Programs for conducting such integration of code are also conventional and well known to those of ordinary skill in the art. For example, such code can be integrated by a compiler, which is conventional and well known to those of ordinary skill in the art.
In a more specific aspect, the business rule code is located in the existing program through the use of a graphical editor such as those that are readily commercially available. The business rule code is identified and located by identifying the business rule""s point of origin and/or the boundaries in the existing program using the graphical editor. More specifically, for purposes of this disclosure, xe2x80x9cpoint of originxe2x80x9d are places in the program where the business rule originates. For example, such points in the program is where the data goes into and out of the program. Boundaries define which portions of the program functionality to exclude from the business rule. Thus, with the graphical editor, a user can point to a variable in a place in the program and specify at what point to extract the code after analysis of the code.
For purposes of this disclosure, a typical graphical editor which can be used is the graphical editor program sold under the name Hyperview(trademark) by Relativity Technologies of Cary, North Carolina as part of its RescueWare(trademark) software offering. While specific reference to product tools has been made, implementation of the invention is not limited to those tools. Any conventional tool developed, or easily developed, for example, a syntax based editor can be used in place of the noted tool. For purposes herein, a syntax based editor is an editor that recognizes particular syntax constructs of a language. For example, such an editor may display an outline of the program or it may colorize verbs and variables in different colors. Another example of such a tool is one marketed and made available under the name Visual Developer Studio 97(trademark), available commercially from Microsoft Corporation of Redmond, Washington.
In recognition that a business rule can be made up of multiple separate business rules, for example, as in the case where a mortgage calculation will vary from state to state, such a business rule may be made up of: (1) a business rule outlining how the mortgage calculation is generally performed; and (2) a second business rule adjusting the mortgage calculation for a specific state. In such a case, a blocking technique can be used which is made up of backtracking through the existing code using the graphical editor to extract only the portions of the existing code making up the portions of the business rule desired to be extracted. Thus, by specifying blocking points, blocking allows the business rule extraction to stop the backtracking of the calculation at certain predetermined points selected by the user. Such blocking can be established as being of two types. The first type is known as generic blocking and stops the business rule extraction process at some given statement types, for example, at any xe2x80x9cinput/outputxe2x80x9d statement. A second type of blocking known as specific blocking stops the business rule extraction process at some statements which are predetermined and specified by the user.
In another aspect, the invention relates to a system for extracting and transforming a business rule from an existing program to a new application. The system includes means for identifying and locating business rule code in the existing program. Such means for identifying and locating the business rule code in the existing program can be, for example, as previously noted, a graphical editor or a subroutine thereof. Similarly, means for extracting the business rule in the human readable code form from the business rule code in the existing program is provided, and such means can be, for example, a second subroutine of a graphical editor program. Means for generating the code for the new application for containing the business rule therein is also provided, and can be, for example, a translator or code generator. Further, means for integrating the code for the new application is provided. Such means can be one of several conventional and well known programs used to integrate code into application programs such as a compiler, as will be readily apparent to those of ordinary skill in the art.